/* AdjustTemp. Forcing the system to the correct T via crude velocity rescaling */
/* Rapaport, sections 3.6, 6.3, 8.2, 8.5, 11.6 */
void AdjustTemp()
{
  int n;
  real scalingFac;
  scalingFac = sqrt( DOFs * extTemperature * kB_IN_BRAHMS_UNITS / ( 2. * CalcKinEnergy() ) ); // printf("scalingFac=%f\n", scalingFac);
  DO_SITE {
    VScale( siteVelocity[ n ], scalingFac );
    VScale( siteAngularMomentum[ n ], scalingFac );
  }
}

